/**
 * Company:湖南省汇聚赢农业开发有限公司
 */

package com.hunhjy.wx.wxsdk;

/**
 * @Description: 微信公众号基础信息
 * @author ZhuoQi_Zou
 * @date 2016年6月25日 下午11:14:12
 *
 */
public class WxAccount {

	/** 公众号原始ID */
	private String wxId;

	/** 公众号昵称 */
	private String nickName;

	/** 公众号类型 D:订阅号 E:企业号 S:服务号 */
	private String wxType;

	/** 是否认证 */
	private boolean pass;
	
	/** 应用Id */
	private String appId;

	/** 应用密钥 */
	private String appSecret;

	/** 令牌 */
	private String token;

	/** AES安全加密密钥 */
	private String encodingAESKey;

	/** 是否信息加密 */
	private boolean encryptMsg;

	public boolean isEncryptMsg() {
		return encryptMsg;
	}

	public void setEncryptMsg(boolean encryptMsg) {
		this.encryptMsg = encryptMsg;
	}

	public String getWxId() {
		return wxId;
	}

	public void setWxId(String wxId) {
		this.wxId = wxId;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getAppId() {
		if (appId == null)
			throw new IllegalStateException("appId  未被赋值");
		return appId;
	}

	public void setAppId(String appId) {
		if (appId == null)
			throw new IllegalStateException("appId 值不能为 null");
		this.appId = appId;
	}

	public String getAppSecret() {
		if (appSecret == null)
			throw new IllegalStateException("appSecret 未被赋值");
		return appSecret;
	}

	public void setAppSecret(String appSecret) {
		if (appSecret == null)
			throw new IllegalStateException("appSecret  值不能为 null");
		this.appSecret = appSecret;
	}

	public String getToken() {
		if (token == null)
			throw new IllegalStateException("token 未被赋值");
		return token;
	}

	public void setToken(String token) {
		if (token == null)
			throw new IllegalStateException("token  值不能为 null");
		this.token = token;
	}

	public String getEncodingAESKey() {
		if (encodingAESKey == null)
			throw new IllegalStateException("encodingAESKey  未被赋值");
		return encodingAESKey;
	}

	public void setEncodingAESKey(String encodingAESKey) {
		if (encodingAESKey == null)
			throw new IllegalStateException("encodingAESKey 值不能为 null");
		this.encodingAESKey = encodingAESKey;
	}

	public String getWxType() {
		return wxType;
	}

	public void setWxType(String wxType) {
		this.wxType = wxType;
	}

	public boolean isPass() {
		return pass;
	}

	public void setPass(boolean pass) {
		this.pass = pass;
	}

	public String toString() {
		return "MPAccount [wxId=" + wxId + ", nickName=" + nickName + ", appId=" + appId + ", appSecret=" + appSecret
				+ ", token=" + token + ", encodingAESKey=" + encodingAESKey + ", wxType=" + wxType + ", pass=" + pass
				+ "]";
	}

}
